home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 6 / Amiga Format AFCD06 (Nov 1996, Issue 90).iso / serious / shareware / misc / vark15 / utils p-z / extract w-x < prev    next >
Text File  |  1996-08-26  |  3KB  |  81 lines

  1. ; crummy multiArchive extractor : By Neil Mohr 
  2. ; $VER: crummy multilzx extractor v1.0b (15:08 28 Jan 1996)
  3. ; Modified by Vark for Vark 15 Disk 2, cos I'm a lazy bastard
  4. ; It's too hot today anyway :)
  5. ;all specified archives must be in the same directory, with lha
  6. ;start with file1, file2 .. don't intersperse entries
  7.  
  8. (complete 0)
  9. (welcome)
  10.  
  11. (if (OR (= (getDevice @icon) "DF0") (= (getDevice @icon) "DF1") (= (getDevice @icon) "DF2"))
  12.     (set originalDisc (getAssign (getDevice @icon) "d")) )
  13. (set @default-dest "")
  14. (set @app-name "")
  15. (set counter 0)
  16. (foreach "" "#?.lha" (set counter (+ counter 1)) )
  17. (set completeVal (+ counter 1))
  18. (set destPrompt "Where do you want the archives extracting?")
  19.  
  20. (user 2)
  21. (message "\n\n\nTo use this installer properly you need\na hard drive, or at "
  22.          "least, plenty of free memory.\n\n\nAlso this icon should be in the same "
  23.          "directory as the archives, and LHA in c: otherwise it will not work!")
  24.  
  25. (set file1  "WBFade.Lha")
  26. (set file2  "WBWait15.Lha")
  27. (set file3  "XOpa.Lha")
  28.  
  29. (while (OR (= (getAssign (getDevice @default-dest) "d") originalDisc )
  30.            (= originalDisc "") )
  31.   (set destination
  32.     (askdir (help @askdir-help) (prompt destPrompt)
  33.     (newpath)
  34.     (default "RAM:")
  35.   ))
  36. (set destPrompt "Where do you want the archives extracting?\nBut please don't pick the coverdisc!")
  37. (set @default-dest destination)
  38. )
  39.  
  40.  
  41. (if (NOT (= (substr @default-dest (- (strlen @default-dest) 1) 1) ":")) (set @default-dest (cat @default-dest "/")))
  42.  
  43. (if (= (getDevice @default-dest) "RAM")
  44.   (if (< (+(dataBase "total-mem")) 1000000) (message "\n\n\nYou may not have enough memory.\n\nPress proceed to try anyway."))
  45.   (if (< (getDiskSpace @default-dest)) 1000000 (message "\n\n\nYou may not have enough disc space.\n\nPress proceed to try anyway."))
  46. )
  47.  
  48. (set response (askoptions (prompt "Pick which archives to extract.") (help @askoptions-help) (choices
  49.  
  50. file1
  51. file2
  52. file3
  53.  
  54. )) )
  55.  
  56. (set counter (- counter 1))
  57.  
  58. (until (= counter -1)
  59.  
  60.   (if (IN response counter) ((set @app-name file3)  (set response (- response 4)) ))
  61.   (if (IN response counter) ((set @app-name file2)  (set response (- response 2)) ))
  62.   (if (IN response counter) ((set @app-name file1)  (set response (- response 1)) ))
  63.  
  64.   (if (NOT (= @app-name ""))
  65.     ( (complete (* (- completeVal counter ) (/ 100 completeVal)) )
  66.       (working "\n\n\nI am now extracting " @app-name " to " @default-dest ".\n\nPlease Wait.")
  67.       (set unArc (cat "c:lha x -m -x \"" @app-name "\" \"" @default-dest "\""))
  68.       (if (> (run unArc) 0)  (message "lha reported an error when extracting\n" @app-name " to the destination path " @default-dest ".\n\nThis could either be a problem with how\nyour computer is setup or with the disk itself.\nTry running the HD-Setup Icon, and make sure you are running MultiExtract from the cover disk, it may be the destination " @default-dest " does not have enought room.\n\nIf problems persist ring 01625 878888 and ask for Amiga Computing Technical Help.\n\nPress Proceed To Continue." ))
  69.     )
  70.   )
  71.  
  72.   (set counter (- counter 1))
  73.   (set @app-name "")
  74.  
  75. )
  76.  
  77. (complete 100)
  78. (message "\n\n\n\nHopefully all your chosen files\nhave been extracted correctly!\n\nand can be found in " @default-dest)
  79.  
  80. (exit (quiet))
  81.